from functools import reduce


def normalize(name):
    return [i for i in map(lambda x: x.lower(), name)]

name = ['adam', 'LISA', 'barT']
print(normalize(name))


def prod(L):
    return reduce(lambda x, y: x*y, L)

L = [1,2,3,4]
print(prod(L))


dic_char_to_num = {'1': 1,'2': 2,'3': 3,'4': 4,'5': 5,'6': 6,'7': 7,'8': 8,'9': 9,'0': 0}

def char2num(c:str):
    return  dic_char_to_num[c] if c in dic_char_to_num else ''

def str2float(s:str):
    number = reduce(lambda x, y: x*10 + y, [i for i in map(char2num, s) if isinstance(i, int)])

    if '.' in s:
        for i in range(len(s) - s.index('.') -1):
            number /= 10
    
    return number

def str2float(s):
    a=s.index('.')
    b=int(s[:a])
    c=int(s[a+1:])
    return b+c*0.1**(len(s)-a-1)

s = '12.34'
print(str2float(s))
